package cn.hk.query.controller;

import cn.HK.po.User;
import cn.hk.query.mapper.QueryMapper;
import cn.hk.query.service.QueryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class QueryController {
    /*
     * 请求路径	/user/personalMSG
        请求方式	get
        请求参数	uid
        返回值类型	User
     * */
    @Autowired
    private QueryService queryService;
    @RequestMapping(value = "/personalMSG",method = RequestMethod.GET)
    public User queryUser(@PathVariable("uId") Integer uId){
        User user= queryService.queryOneUser(uId);
        return user;
    }
}
